# -*- coding: utf-8 -*-
"""
Created on Tue Feb 21 19:24:58 2023

@author: xtp

"""

from multiprocessing import cpu_count
import Multiprocessing1_v2
import Multiprocessing2_v2
import warnings
import time 

warnings.filterwarnings("ignore")

cores = cpu_count()
print("CPU cores number: %d" % cores)

if __name__ == '__main__':
    
    begin_time = time.time()
    
    print("Multiprocessing1: ")
    Multiprocessing1_v2.Multiprocessing()
    print("Multiprocessing2: ")
    Multiprocessing2_v2.Multiprocessing()

    end_time = time.time()
    run_time = round(end_time-begin_time)
    hours = run_time//3600
    minutes = (run_time-3600*hours)//60
    seconds = run_time-3600*hours-60*minutes
    print(f'Runing time：{hours} hours {minutes} minutes {seconds} secends')

    